package com.itlong.cloud.iottp;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.Map;

/**
 * <desc>
 *      微信消息服务暴露接口
 * </desc>
 *
 * @createDate 2019/05/17
 */
@FeignClient(name = "iot-tp-service")
public interface IWeChatMessageServiceClient {

    /**
     * <desc>
     *      处理微信发来的请求返回推送xml
     * </desc>
     *
     * @param request
     * @return
     *@createDate 2019/05/17
     */
    @RequestMapping(path = "/iotTp/message/processRequestForNews",method = RequestMethod.POST)
    String processRequestForNews(@RequestBody Map<String, String> request);


    /**
     * <desc>
     *      定时任务更新微信公众号与小程序之间的关联关系
     * </desc>
     *
     * @throws Exception
     * @author Jiaqi.X
     * @createDate 2019/05/21
     */
    @RequestMapping(path = "/iotTp/message/bindOfficeOpenIdAndMiniProgramOpenId",method = RequestMethod.POST)
    void bindOfficeOpenIdAndMiniProgramOpenId() throws Exception;
}
